package site.huoqiang.emos.controller;

import cn.dev33.satoken.annotation.SaCheckLogin;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import site.huoqiang.emos.common.util.R;
import site.huoqiang.emos.pojo.AmectType;
import site.huoqiang.emos.service.AmectTypeService;

import java.util.ArrayList;

/**
 * @author: huoqiang huoqiang
 * @date: 2022-03-20
 */
@RestController
@RequestMapping("/amect_type")
@Tag(name = "罚款类型模块Web接口")
public class AmectTypeController {

    @Autowired
    private AmectTypeService amectTypeService;

    @GetMapping("/searchAllAmectType")
    @Operation(summary = "查询所有罚款类型")
    @SaCheckLogin
    public R searchAllAmectType() {
        final ArrayList<AmectType> list = amectTypeService.searchAllAmectType();
        return R.ok().put("list", list);
    }

}
